import request from "../utils/request.js";


// 获取指定用户所有连接
export const getAllLink = () => {
    return request({
        method: 'get',
        url: '/userDb/selectAllDB2',
    })
}


//获取指定连接的所有数据库
export const getAllPool = (id) => {
    return request({
        method: "get",
        url: "/userDb/selectAllDB",
        params: {
            id
        }
    })
}


//获取指定数据库的所有表
export const getAllScheme = (dbName, id) => {
    return request({
        method: "get",
        url: "/userDb/selectAllTable",
        params: {
            dbName,
            id
        }
    })
}

// 获取指定数据表数据
export const getSchemeDataAPI = (dbName, id, tableName) => {
    return request({
        method: "get",
        url: "/userDb/selectTableData",
        params: {
            dbName,
            id,
            tableName
        }
    })
}
